package com.aynu.admin.service.base.impl;

import com.aynu.admin.domain.CommonResponse;
import com.aynu.admin.mapper.base.StatisticsMapper;
import com.aynu.admin.service.base.IStatistics;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class Statistics implements IStatistics {
    @Resource
    private StatisticsMapper statisticsMapper;

    @Override
    public CommonResponse<Map<String, Long>> strokeStatistics() {
        return CommonResponse.success(statisticsMapper.strokeStatistics());
    }

    @Override
    public CommonResponse<List<Map<Integer, Long>>> orderStatistics() {
        return CommonResponse.success(statisticsMapper.orderStatistics());
    }

    @Override
    public CommonResponse<List<Map<Integer, Long>>> roleStatistics() {
        return CommonResponse.success(statisticsMapper.roleStatistics());
    }
}
